package com.hyz.approval.mapper;

import com.hyz.approval.pojo.Approval;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author HGD
 * @date 2022/9/28 20:17
 */
@Mapper
public interface ApprovalMapper {
    /**
     * 创建审批
     *
     * @param approval 审批
     * @return 创建数量
     */
    Integer insertApproval(@Param("approval") Approval approval);

    /**
     * 修改审批
     *
     * @param approval 审批
     * @return 修改数量
     */
    Integer updateApproval(@Param("approval") Approval approval);

    /**
     * 根据申请id获取到对应的审批
     *
     * @param id 申请id
     * @return 审批
     */
    Approval getApprovalById(@Param("id") Long id);
}
